import request from '@/utils/request'

// 查询店铺列表列表
export function listShopinfo(query) {
  return request({
    url: '/dianpu/shopinfo/list',
    method: 'get',
    params: query
  })
}

// 查询店铺列表详细
export function getShopinfo(id) {
  return request({
    url: '/dianpu/shopinfo/' + id,
    method: 'get',
    params: {
      t: new Date().getTime() // 添加时间戳避免缓存
    }
  })
}

// 新增店铺列表
export function addShopinfo(data) {
  return request({
    url: '/dianpu/shopinfo',
    method: 'post',
    data: data
  })
}

// 修改店铺列表
export function updateShopinfo(data) {
  return request({
    url: '/dianpu/shopinfo',
    method: 'put',
    data: data
  })
}

// 删除店铺列表
export function delShopinfo(id) {
  return request({
    url: '/dianpu/shopinfo/' + id,
    method: 'delete'
  })
}
